﻿<navigation:Page
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           x:Class="LEEAAttendanceControl.Views.MainView"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="580"
           Title="LEEA Attendance Control">

    <toolkit:BusyIndicator HorizontalAlignment="Center" VerticalAlignment="Center" 
         Name="busyIndicator" IsBusy="false">

        <Grid x:Name="LayoutRoot">
        <Grid.Resources>
            <sdk:HierarchicalDataTemplate x:Key="EmployeeTemplate">
                <StackPanel Orientation="Horizontal">
                    <Ellipse Fill="{Binding Color}" Stroke="{Binding Color}" Height="8" Width="8" Margin="0,0,5,0"/>
                    <TextBlock Text="{Binding Name}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
                </StackPanel>
            </sdk:HierarchicalDataTemplate>
            <sdk:HierarchicalDataTemplate x:Key="DepartmentTemplate" ItemTemplate="{StaticResource EmployeeTemplate}"
                                          ItemsSource="{Binding Nodes}">
                <TextBlock Text="{Binding Name}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
            </sdk:HierarchicalDataTemplate>
            <sdk:HierarchicalDataTemplate x:Key="CompanyTemplate" ItemsSource="{Binding Nodes}"
                                          ItemTemplate="{StaticResource DepartmentTemplate}">
                <TextBlock Text="{Binding Name}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
            </sdk:HierarchicalDataTemplate>
        </Grid.Resources>
            <Grid Height="35" Background="Black" VerticalAlignment="Top">
                <Ellipse Fill="White" Width="30" Height="30" Margin="5,0,0,0" HorizontalAlignment="Left"/>
                <Image Source="/LEEAAttendanceControl;component/Images/Time.png" Width="30" Height="30" Margin="5,0,0,0"
                   HorizontalAlignment="Left"/>

                <TextBlock Text="LEEA Time Control" FontSize="17" Foreground="White" FontWeight="Bold" Margin="45,5,0,0"/>

                <Border HorizontalAlignment="Right" BorderBrush="White" BorderThickness="1" Margin="2,2,6,2">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock x:Name="welcomeText" Foreground="White" FontSize="12" Text="Welcome - Fathi"
                           VerticalAlignment="Center" Margin="15,0,15,0"/>
                        <Rectangle Width="1" Fill="White" Height="20"/>
                        <HyperlinkButton x:Name="hyperLogout" Content="Logout" FontSize="12" VerticalAlignment="Center"
                                 Margin="15,0,15,0" Click="hyperLogout_Click" BorderBrush="Azure" BorderThickness="2"
                                 Foreground="Aqua"/>
                    </StackPanel>
                </Border>
            </Grid>

            <Grid Background="White" Margin="0,35,0,0" ShowGridLines="False">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="250" MaxWidth="250"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="225"/>
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition Height="58"/>
                </Grid.RowDefinitions>

                <Border Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" BorderBrush="Black" BorderThickness="1">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition/>
                            <RowDefinition Height="150"/>
                        </Grid.RowDefinitions>

                        <toolkit:Accordion x:Name="taskDion" toolkit:DockPanel.Dock="Top" Height="430" SelectionMode="ZeroOrOne"
                                       Width="240" Margin="4" Grid.Row="0" Loaded="taskDion_Loaded">
                            <toolkit:AccordionItem x:Name="EmpHoursItem" Header="Employee Hours" FontSize="12"
                                               Selected="EmpHoursItem_Selected">
                                <Canvas>
                                    <HyperlinkButton x:Name="EmpPunchLink" Canvas.Left="25" Canvas.Top="15" Content="Employee Punches"
                                                 TargetName="mainFrame" NavigateUri="/Views/EmployeeHours.xaml"/>
                                    <HyperlinkButton Canvas.Left="25" Canvas.Top="40" Content="Employee Overtime"
                                                 TargetName="mainFrame" NavigateUri="/Views/EmployeeOvertime.xaml"/>

                                    <Grid Background="#404041" Width="235" Canvas.Left="0" Canvas.Top="70" >
                                        <TextBlock Text="Punches" Foreground="White" FontSize="12" FontWeight="Bold" Margin="5,2,2,2"/>
                                    </Grid>

                                    <HyperlinkButton x:Name="NewPunchLink" Canvas.Left="25" Canvas.Top="105"
                                                 Content="New Punch" Click="NewRecordLink_Click"/>
                                    <HyperlinkButton x:Name="EditPunchLink" Canvas.Left="25" Canvas.Top="130"
                                                 Content="Edit Punch" Click="EditRecordLink_Click"/>
                                    <HyperlinkButton x:Name="DeletePunchLink" Canvas.Left="25" Canvas.Top="155"
                                                 Content="Delete Punch" Click="DeleteRecordLink_Click"/>
                                </Canvas>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="ReportsItem" Header="Reports" FontSize="12"
                                               Selected="ReportsItem_Selected">
                                <Grid Width="235">
                                    <ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled">
                                        <Canvas Height="260">
                                            <HyperlinkButton x:Name="SummaryCardRepLink" Canvas.Left="25" Canvas.Top="10"
                                                         Content="Summary Time Card" Click="SummaryCardRepLink_Click"/>
                                            <HyperlinkButton x:Name="DetailedCardRepLink" Canvas.Left="25" Canvas.Top="35"
                                                         Content="Detailed Time Card" Click="DetailedCardRepLink_Click"/>
                                            <HyperlinkButton x:Name="DetailedOvertimeRepLink" Canvas.Left="25" Canvas.Top="60"
                                                         Content="Detailed Overtime" Click="DetailedOvertimeRepLink_Click"/>
                                            <HyperlinkButton x:Name="ShiftAssignmentRepLink" Canvas.Left="25" Canvas.Top="85"
                                                         Content="Shift Assignments" Click="ShiftAssignmentRepLink_Click"/>
                                            <HyperlinkButton x:Name="ExAssignmentRepLink" Canvas.Left="25" Canvas.Top="110"
                                                         Content="Exception Assignments" Click="ExAssignmentRepLink_Click"/>
                                            <HyperlinkButton x:Name="OnSiteRepLink" Canvas.Left="25" Canvas.Top="135"
                                                         Content="Onsite Presence" Click="OnSiteRepLink_Click"/>
                                            <HyperlinkButton x:Name="LateComerRepLink" Canvas.Left="25" Canvas.Top="160"
                                                         Content="Late Comers" Click="LateComerRepLink_Click"/>
                                            <HyperlinkButton x:Name="AbsenceRepLink" Canvas.Left="25" Canvas.Top="185"
                                                         Content="Absence" Click="AbsenceRepLink_Click"/>
                                            <HyperlinkButton x:Name="SavedHoursRepLink" Canvas.Left="25" Canvas.Top="210"
                                                         Content="Saved Hours" Click="SavedHoursRepLink_Click"/>
                                            <HyperlinkButton x:Name="MissingPunchRepLink" Canvas.Left="25" Canvas.Top="235"
                                                         Content="Missing Punches" Click="MissingPunchRepLink_Click" />
                                        </Canvas>
                                    </ScrollViewer>
                                </Grid>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="StructureItem" Header="Company Structure" FontSize="12"
                                               Selected="StructureItem_Selected">
                                <Grid Width="235">
                                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible">
                                        <Canvas Height="440">
                                            <Grid Canvas.Left="0" Canvas.Top="0" Background="#404041" Width="235">
                                                <TextBlock Text="Manage Company" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                   FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="NewComLink" Content="New Company" Click="NewComLink_Click"
                                                         Canvas.Left="25" Canvas.Top="35"/>
                                            <HyperlinkButton x:Name="EditComLink" Content="Edit Company" Canvas.Left="25"
                                                         Canvas.Top="60" Click="EditComLink_Click"/>
                                            <HyperlinkButton x:Name="DeleteComLink" Content="Delete Company" Canvas.Left="25"
                                                         Canvas.Top="85" Click="DeleteComLink_Click"/>

                                            <Grid Canvas.Left="0" Canvas.Top="115" Background="#404041" Width="235">
                                                <TextBlock Text="Manage Department" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                   FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="NewDepLink" Content="New Department" Canvas.Left="25"
                                                         Canvas.Top="150" Click="NewDepLink_Click"/>
                                            <HyperlinkButton x:Name="EditDepLink" Content="Edit Department" Canvas.Left="25"
                                                         Canvas.Top="175" Click="EditDepLink_Click"/>
                                            <HyperlinkButton x:Name="DeleteDepLink" Content="Delete Department" Canvas.Left="25"
                                                         Canvas.Top="200" Click="DeleteDepLink_Click"/>

                                            <Grid Canvas.Left="0" Canvas.Top="230" Background="#404041" Width="235">
                                                <TextBlock Text="Manage Employee" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                   FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="NewEmpLink" Content="New Employee" Canvas.Left="25"
                                                         Canvas.Top="265" Click="NewRecordLink_Click"/>
                                            <HyperlinkButton x:Name="EditEmpLink" Content="Edit Employee" Canvas.Left="25"
                                                         Canvas.Top="290" Click="EditRecordLink_Click"/>
                                            <HyperlinkButton x:Name="DeleteEmpLink" Content="Delete Employee" Canvas.Left="25"
                                                         Canvas.Top="315" Click="DeleteRecordLink_Click"/>

                                            <Grid Canvas.Left="0" Canvas.Top="350" Background="#404041" Width="235">
                                                <TextBlock Text="Details" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                       FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="ComDetailsLink" Content="Company Details"
                                                             Canvas.Left="25" Canvas.Top="385" Click="ComDetailsLink_Click"/>
                                            <HyperlinkButton x:Name="EmpDetailsLink" Content="Employee Details"
                                                             Canvas.Left="25" Canvas.Top="410" Click="EmpDetailsLink_Click"/>
                                        </Canvas>
                                    </ScrollViewer>
                                </Grid>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="ShiftsItem" Header="Shifts" FontSize="12" Selected="ShiftsItem_Selected">
                                <Grid Width="235">
                                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible">
                                        <Canvas Height="315">
                                            <Grid Canvas.Left="0" Canvas.Top="0" Background="#404041" Width="235">
                                                <TextBlock Text="Shifts Management" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                   FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="ShiftsLink" Content="Shifts" Canvas.Left="25"
                                                         Canvas.Top="35" TargetName="mainFrame"
                                                         NavigateUri="/Views/Shifts.xaml" Click="ShiftsLink_Click"/>
                                            <HyperlinkButton x:Name="ShitAssignmentsLink" Content="Shift Assignments"
                                                         Canvas.Left="25" Canvas.Top="60" Click="ShitAssignmentsLink_Click"
                                                         TargetName="mainFrame" NavigateUri="/Views/EmployeesShifts.xaml"/>

                                            <Grid Canvas.Left="0" Canvas.Top="90" Background="#404041" Width="235">
                                                <TextBlock Text="Manage Shifts" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                   FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="NewShiftLink" Content="New Shift" Canvas.Left="25" Canvas.Top="125"
                                                         Click="NewRecordLink_Click"/>
                                            <HyperlinkButton x:Name="EditShiftLink" Content="Edit Shift" Canvas.Left="25" Canvas.Top="150"
                                                         Click="EditRecordLink_Click"/>
                                            <HyperlinkButton x:Name="DeleteShiftLink" Content="Delete Shift" Canvas.Left="25" Canvas.Top="175"
                                                         Click="DeleteRecordLink_Click"/>

                                            <Grid Canvas.Left="0" Canvas.Top="205" Background="#404041" Width="235">
                                                <TextBlock Text="Manage Assignments" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                       FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="NewShiftAssignLink" Content="New Assignments" Canvas.Left="25"
                                                         Canvas.Top="240" NavigateUri="/Views/ShiftAssignments.xaml"
                                                         TargetName="mainFrame"/>
                                            
                                            
                                            <HyperlinkButton x:Name="EditShiftAssignLink" Content="Edit Assignment"
                                                         Canvas.Left="25" Canvas.Top="265" Click="EditRecordLink_Click"
                                                             IsEnabled="False"/>
                                            

                                            <HyperlinkButton x:Name="DeleteShiftAssignLink" Content="Delete Assignment"
                                                         Canvas.Left="25" Canvas.Top="290" Click="DeleteRecordLink_Click"/>
                                        </Canvas>
                                    </ScrollViewer>
                                </Grid>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="ExceptionsItem" Header="Exceptions" FontSize="12"
                                               Selected="ExceptionsItem_Selected">
                                <Grid Width="235">
                                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible">
                                        <Canvas Height="285">
                                            <HyperlinkButton x:Name="ExceptionsLink" Content="Exceptions" Canvas.Left="25"
                                                         Canvas.Top="15" Click="ExceptionsLink_Click"
                                                         TargetName="mainFrame" NavigateUri="/Views/Exceptions.xaml"/>

                                            <HyperlinkButton x:Name="ExAssignmentsLink" Content="Exception Assignments"
                                                         Canvas.Left="25" Canvas.Top="40" Click="ExAssignmentsLink_Click"
                                                         TargetName="mainFrame" NavigateUri="/Views/EmployeesExceptions.xaml"/>

                                            <Grid Canvas.Left="0" Canvas.Top="70" Background="#404041" Width="235">
                                                <TextBlock Text="Manage Exceptions" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                                   FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="NewExceptionLink" Content="New Exception" Canvas.Left="25"
                                                 Canvas.Top="100" Click="NewRecordLink_Click"/>
                                            <HyperlinkButton x:Name="EditExceptionLink" Content="Edit Exception" Canvas.Left="25"
                                                 Canvas.Top="125" Click="EditRecordLink_Click"/>
                                            <HyperlinkButton x:Name="DeleteExceptionLink" Content="Delete Exception" Canvas.Left="25"
                                                 Canvas.Top="150" Click="DeleteRecordLink_Click"/>

                                            <Grid Canvas.Left="0" Canvas.Top="180" Background="#404041" Width="235">
                                                <TextBlock Text="Manage Assignments" Margin="5,2,2,2" Foreground="White" FontSize="12"
                                               FontWeight="Bold"/>
                                            </Grid>

                                            <HyperlinkButton x:Name="NewExAssignmentsLink" Content="New Assignments"
                                                         Canvas.Left="25" Canvas.Top="210" TargetName="mainFrame"
                                                         NavigateUri="/Views/ExceptionAssignments.xaml"/>

                                            <HyperlinkButton x:Name="EditExAssignLink" Content="Edit Assignment" Canvas.Left="25"
                                                         Canvas.Top="235" Click="EditRecordLink_Click"/>

                                            <HyperlinkButton x:Name="DeleteExAssignLink" Content="Delete Assignment" Canvas.Left="25"
                                                         Canvas.Top="260" Click="DeleteRecordLink_Click"/>
                                        </Canvas>
                                    </ScrollViewer>
                                </Grid>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="JobsItem" Header="Jobs" FontSize="12" Selected="JobsItem_Selected">
                                <Canvas>
                                    <HyperlinkButton x:Name="NewJobLink" Canvas.Left="25" Canvas.Top="15" Content="New Job"
                                                 Click="NewRecordLink_Click"/>
                                    <HyperlinkButton x:Name="EditJobLink" Canvas.Left="25" Canvas.Top="40" Content="Edit Job"
                                                 Click="EditRecordLink_Click"/>
                                    <HyperlinkButton x:Name="DeleteJobLink" Canvas.Left="25" Canvas.Top="65" Content="Delete Job"
                                                 Click="DeleteRecordLink_Click"/>
                                </Canvas>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="LocationsItem" Header="Locations" FontSize="12"
                                               Selected="LocationsItem_Selected">
                                <Canvas>
                                    <HyperlinkButton x:Name="NewLocationLink" Canvas.Left="25" Canvas.Top="15"
                                                 Content="New Location" Click="NewRecordLink_Click"/>
                                    <HyperlinkButton x:Name="EditLocationLink" Canvas.Left="25" Canvas.Top="40"
                                                 Content="Edit Location" Click="EditRecordLink_Click"/>
                                    <HyperlinkButton x:Name="DeleteLocationLink" Canvas.Left="25" Canvas.Top="65"
                                                 Content="Delete Location" Click="DeleteRecordLink_Click"/>
                                </Canvas>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="SettingsItem" Header="Settings" FontSize="12"
                                               Selected="SettingsItem_Selected">
                                <Canvas>
                                    <HyperlinkButton Canvas.Left="25" Canvas.Top="15" Content="Accounting Period"
                                                 TargetName="mainFrame" NavigateUri="/Views/AccountingPeriod.xaml"/>
                                    <HyperlinkButton Canvas.Left="25" Canvas.Top="40" Content="Work Time"
                                                 TargetName="mainFrame" NavigateUri="/Views/WorkTime.xaml"/>
                                    <HyperlinkButton Canvas.Left="25" Canvas.Top="65" Content="Work Days" TargetName="mainFrame"
                                                 NavigateUri="/Views/WorkDays.xaml"/>
                                </Canvas>
                            </toolkit:AccordionItem>
                            <toolkit:AccordionItem x:Name="UsersItem" Header="Users" FontSize="12" Selected="UsersItem_Selected">
                                <Canvas>
                                    <HyperlinkButton x:Name="NewUserLink" Canvas.Left="25" Canvas.Top="15" Content="New User"
                                                 Click="NewRecordLink_Click"/>
                                    <HyperlinkButton x:Name="EditUserLink" Canvas.Left="25" Canvas.Top="40" Content="Edit User"
                                                 Click="EditRecordLink_Click"/>
                                    <HyperlinkButton x:Name="DeleteUserLink" Canvas.Left="25" Canvas.Top="65" Content="Delete User"
                                                 Click="DeleteRecordLink_Click"/>
                                </Canvas>
                            </toolkit:AccordionItem>
                        </toolkit:Accordion>

                        <StackPanel Orientation="Vertical" Grid.Row="1">
                            <Grid Background="#404041" Height="30">
                                <TextBlock Text="Accounting Period" FontFamily="Verdana" FontSize="14" FontWeight="Bold"
                                   VerticalAlignment="Center" Margin="5,0,0,0" Foreground="White"/>
                            </Grid>

                            <Grid Height="20"/>

                            <Canvas>
                                <TextBlock Text="From: " FontSize="12" FontWeight="Bold" Canvas.Left="15" Canvas.Top="5"/>
                                <sdk:DatePicker x:Name="PeriodFrom" Width="160" Canvas.Left="70" Canvas.Top="0"/>

                                <TextBlock Text="To: " FontSize="12" FontWeight="Bold" Canvas.Left="15" Canvas.Top="35"/>
                                <sdk:DatePicker x:Name="PeriodTo" Width="160" Canvas.Left="70" Canvas.Top="30"/>

                                <Button x:Name="applyPeriodButton" Content="Apply" Width="70" Canvas.Left="160" Canvas.Top="65" Click="applyPeriodButton_Click" />
                            </Canvas>
                        </StackPanel>
                    </Grid>
                </Border>

                <Border BorderBrush="Black" BorderThickness="1" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" >
                    <Grid>
                        <sdk:Frame x:Name="mainFrame"/>
                    </Grid>
                </Border>

                <Border BorderBrush="Black" BorderThickness="1" Grid.Column="2" Grid.Row="1">
                    <Grid Margin="0,5,0,5">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="85"/>
                            <ColumnDefinition Width="65"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <TextBlock Text="Attendants:" FontSize="13" Grid.Column="0" Grid.Row="0" Margin="5,2,1,1"/>

                        <sdk:Label x:Name="AttendantsBlock" FontSize="12" Grid.Column="1" Grid.Row="0"
                               Margin="1,2,1,1" HorizontalContentAlignment="Center" BorderBrush="Black"
                               BorderThickness="1" MouseLeftButtonDown="AttendantsBlock_MouseLeftButtonDown"/>

                        <TextBlock Text="Absentee:" FontSize="13" Grid.Column="0" Grid.Row="1" Margin="5,2,1,1"/>

                        <sdk:Label x:Name="AbsenteeBlock" FontSize="12" Grid.Column="1" Grid.Row="1"
                               HorizontalContentAlignment="Center" Margin="1,2,1,1" BorderBrush="Black"
                               BorderThickness="1" MouseLeftButtonDown="AbsenteeBlock_MouseLeftButtonDown"/>

                        <Button x:Name="AttendanceButton" Grid.Column="2" Grid.Row="0" Grid.RowSpan="2"
                            VerticalAlignment="Center" HorizontalAlignment="Center" Margin="15,0,0,1"
                            Click="AttendanceButton_Click">
                            <ToolTipService.ToolTip>
                                <ToolTip Content="Refresh"/>
                            </ToolTipService.ToolTip>
                            <Button.Content>
                                <Image Source="/LEEAAttendanceControl;component/Assets/Refresh.png" Width="35" Height="28"/>
                            </Button.Content>
                        </Button>
                    </Grid>
                </Border>

                <Border BorderBrush="Black" BorderThickness="1" Grid.Column="2" Grid.Row="0">
                    <sdk:TreeView x:Name="structureTree" BorderBrush="Black" BorderThickness="1" Margin="5"
                              Loaded="structureTree_Loaded" ItemTemplate="{StaticResource CompanyTemplate}"
                              SelectedItemChanged="structureTree_SelectedItemChanged"/>
                </Border>

            </Grid>
       
    </Grid>
    </toolkit:BusyIndicator>
</navigation:Page>
